import 'package:flutter/material.dart';

class MyLoading extends StatelessWidget {
  final String loadingText;

  const MyLoading({
    this.loadingText = '加载中',
    Key key,
  });

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: Alignment.center,
      decoration: BoxDecoration(color: Color.fromRGBO(50, 50, 50, 0.8)),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          RefreshProgressIndicator(),
          Text(
            '${this.loadingText}',
            style: TextStyle(
              color: Colors.white,
            ),
          ),
        ],
      ),
    );
  }
}
